using System;
using System.Numerics;
using TTEngine.Graphics;
using voidbox;

namespace TTEngine.Graphics
{
    public struct DrawPoint
    {
        // 位置
        public float x;  // offset 0
        public float y;  // offset 4
        public float z;  // offset 8

        // 颜色 (byte)
        public byte r ;    // offset 12
        public byte g;    // offset 13
        public byte b ;    // offset 14
        public byte a ;    // offset 15

        // UV
        public float u;      // offset 16
        public float v;      // offset 20

        // tex&paluv (byte)
        public byte uvlayer;   // offset 24
        public byte e2;   // offset 25
        public byte e3;  // offset 26
        public SpriteEffect eff;    // offset 27

        // UV 范围
        public float umin;//28
        public float vmin;//32
        public float umax;//36
        public float vmax;//40
        //end 44

        public DrawPoint Clone()
        {
            var p = new DrawPoint();
            p.x = this.x;
            p.y = this.y;
            p.z = this.z;
            p.u = this.u;
            p.v = this.v;
            p.r = this.r;
            p.g = this.g;
            p.b = this.b;
            p.a = this.a;
            p.uvlayer = this.uvlayer;
            p.e2 = this.e2;
            p.e3 = this.e3;
            p.eff = this.eff;
            p.umin = this.umin;
            p.vmin = this.vmin;
            p.umax = this.umax;
            p.vmax = this.vmax;

            return p;
        }
    }
} 